import request from "@/utils/request"

export class UserService {
  static login = (phone: string, password: string) => {
    return request.post("user/login/", { phone, password })
  }
  static userlogin = (phone: string, password: string) => {
    return request.post("user/login_user/", { phone, password })
  }

  static info = () => {
    return request.get("user/info/")
  }
  static userinfo = () => {
    return request.get("user/info/user/")
  }
  static adminUserList = (params: any) => {
    return request.get("user/admin/user/", { params })
  }

  static deleteUser = (ids: number[]) => {
    return request.delete("user/admin/user/", { data: { ids } })
  }

  static addUser = (data: any) => {
    return request.post("user/admin/user/", data)
  }

  static updateUser = (data: any) => {
    return request.put("user/admin/user/", data)
  }
  static resetPassword = (data: any) => {
    return request.post("user/pass_reset/", data)
  }
}